@extends('style.app')
@section('ant-content')
    <div class="callout large primary">
        <div class="text-center">
            <h1>Nosso Blog</h1>
        </div>
    </div>
@endsection
@section('content')
    <div class="grid-x grid-padding-x" id="content">
        <div class="medium-8 cell">

                <div class="blog-post">
                    <h3>{{$item->title}} <small>{{$item->created_at}}</small></h3>
                    @if($item->img!='null'))
                    <img class="thumbnail" src="{{$item->img}}">
                    @endif
                    {!! $item->text !!}
                    <div class="callout">
                        <ul class="menu simple">
                            <li>
                                <a href="#">Author: {{$item->User->name}}</a>
                            </li>
                            <li class="is-hidden">
                                <a href="#">Comments: 0</a>
                            </li>
                        </ul>
                    </div>
                </div>

        </div>
        <div class="medium-3 cell" data-sticky-container>
            <div class="sticky" data-sticky data-anchor="content">
                <h4>Categories</h4>
                <ul>

                    @foreach($categories as $category)
                        <li>
                            <a href="{{route('blog.category',$category->id)}}">{{$category->name}}</a>
                        </li>
                    @endforeach
                </ul>
                {{--
                <h4>Authors</h4>
                <ul>
                        <li>
                            <a href="#">Skyler</a>
                        </li>
                </ul>--}}
            </div>
        </div>
    </div>
    <div class="grid-x">
        <div class="cell large-12">
        </div>
    </div>
@endsection